]> dgit.raspbian.org Git - gnome-shell.git/commit
appDisplay: Only use dragMonitor for one icon at a time
authorJonas Dreßler <verdre@v0yd.nl>
Tue, 29 Oct 2019 23:06:10 +0000 (00:06 +0100)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Fri, 27 Mar 2020 22:38:41 +0000 (22:38 +0000)
commit702417ce83eb9a4c4bd491eaf0fa802ffee9b4ba
tree986910bf6c13866053040c85cc7338e946d2ef5e
parent766e9034e25edff4eb82ebfec46395f29e1a7b87
appDisplay: Only use dragMonitor for one icon at a time

Instead of adding a dragMonitor for every icon in the grid as soon as
one icon is getting dragged, only add a dragMonitor for the icon that is
currently being dragged over (ie. the current drag-target). With a large
number of icons in the iconGrid, this should significantly reduce lags
while dragging.

We can do this by detecting the DnD-entering of an icon or folder using
the `handleDragOver()` callback of drag-targets, adding the dragMonitor
because we know an icon is hovering above the drag-target and then
detecting the DnD-leaving of the drag-target by using the `dragMotion()`
handler, where we remove the dragMonitor again as soon as the
targetActor is no longer our actor (ie. the drag-target).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/849
js/ui/appDisplay.js